#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May 19 20:21:31 2024

@author: liqingsimac
"""

'''
##FINAL-A-第5题：
###############################################
import numpy as np
import matplotlib.pyplot as plt

fig=plt.figure()
ax=fig.add_subplot(111)
ax.hlines(y=0,xmin=-1.5,xmax=1.5)
ax.vlines(x=0,ymin=-1.5,ymax=1.5)
ax.set_xlim(-1.5,1.5)
ax.set_ylim(-1.5,1.5)
t=np.linspace(0,np.pi,31)
x=np.cos(t)
y=np.sin(t)
ax.plot(x,y,'b-')
ax.plot(1,0,'r.',markersize=15)
ax.plot(-1,0,'r.',markersize=15)
ax.set_aspect('equal')
ax.set_xticks([-1,0,1])
ax.set_yticks([-1,0,1])
ax.annotate('C',xy=(0.8,0.8),fontsize=15)
fig.savefig('ca-final-a-prob-05.png')
'''

#'''
##FINAL-A-第6题：
###############################################
import numpy as np
import matplotlib.pyplot as plt

fig=plt.figure()
ax=fig.add_subplot(111)
ax.hlines(y=0,xmin=-3.5,xmax=5.5)
ax.vlines(x=0,ymin=-5.5,ymax=2.5)
ax.set_xlim(-3.5,5.5)
ax.set_ylim(-2.5,2.5)
t=np.linspace(0,2*np.pi,51)
x=3+2*np.cos(t)
y=2*np.sin(t)
ax.plot(x,y,'b-')
ax.plot(0,0,'r.',markersize=15)
ax.plot(-2,0,'r.',markersize=15)
ax.plot(2,0,'r.',markersize=15)
ax.plot(3,0,'b.',markersize=15)
ax.set_aspect('equal')
ax.set_xticks([-3,-2,-1,0,1,2,3,4,5])
ax.set_yticks([-2,-1,0,1,2])
ax.annotate('C',xy=(4,0.8),fontsize=15)
fig.savefig('ca-final-a-prob-06.png')
#'''





